<!DOCTYPE html>
<html>

<head>
    <meta charset='UTF-8' />
    <title>初识Vue</title>
    <style>
        .demo{
            background-color: orange;
        }
    </style>
    <!-- 引入Vue -->
    <script type='text/javascript' src='../js/vue.js'></script>
</head>

<body>
    <div id='root'>
        <button id="btn">点我创建一个输入框</button>
    </div>
    <script type='text/javascript'>
        const btn= document.getElementById("btn");
        btn.onclick=()=>{
            const input=document.createElement("input")
            input.classname="demo"
            input.value=99
            input.onclick=()=>{alert(1)}
            document.body.appendChild(input)
            console.log(document.body) //是html的body                                                
            input.focus()//获取焦点
            // input.parentElement.style.backgroundColor = 'skyblue'
			console.log(input.parentElement)//parentElement  父节点
        }
        
    </script>
</body>

</html>